<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>Title</title>
    <link href="/kindeditor-4.1.10/themes/default/default.css" type="text/css" rel="stylesheet">
    <script src="/js/jquery-1.11.0.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/kindeditor-4.1.10/kindeditor-all-min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/kindeditor-4.1.10/lang/zh_CN.js"></script>

    <script type="text/javascript" >
        var kingEditorParams ={
            filePostName  : "file123",//指定上传文件参数名称
            uploadJson:'/newsController/upload2.html',//指定上传文件请求的url。
            dir:"image"//上传类型，分别为image、flash、media、file
        }
        var editor;
        $(function () {
            editor=KindEditor.create($("#editor"),kingEditorParams);
        })
    </script>
</head>
<body>

<form action="/news/add.html" method="post">
<h2>新闻管理系统</h2><br/>
新闻分类：<select name="cartigyId">
                <option value="" selected>--请选择--</option>
            <c:forEach items="${cartiys}" var="cart">
                <option value="${cart.id}">${cart.name}</option>
            </c:forEach>
        </select><br/>
作者：<input type="text" name="author"/><br/>
标题：<input type="text" name="title"/><br/>
内容：<br/>
    <textarea style="width:800px;height:300px;visibility:hidden;" id="editor"></textarea>
    <input type="submit" value="添加"/>
</form>

</body>
</html>
